<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%
	    String path = request.getContextPath();
	    String basePath = request.getScheme() + "://" + request.getServerName() + ":"
	            + request.getServerPort() + path + "/";
	%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>list</title>
<link href="<%=path%>/css/main.css" type="text/css" rel="stylesheet"/>
<link href="<%=path%>/css/jquery.jmodal.css" rel="stylesheet" type="text/css" charset="utf-8"/>

<script language="JavaScript" src="jUnit.js" type="text/JavaScript" charset="utf-8"></script>
 <script language="JavaScript" src="<%=path%>/js/jquery-1.3.1.min.js" type="text/JavaScript"  charset="utf-8"></script>
    <script language="JavaScript" src="<%=path%>/js/jquery.jmodal.js" type="text/JavaScript"  charset="utf-8"></script>
     <script language="JavaScript" src="role.js" type="text/JavaScript"  charset="utf-8"></script>
       
</head>
<style type="text/css">
	
	.viewList { 
		margin-top:0px;
		line-height:28px;
		border:0px; 
		border-collapse:collapse; 
		padding:0; 
		text-align:center;
	}
</style>
<body>
<f:view>
<h:form id="roleForm">
   <h:inputHidden id="searchTag" value="#{roleBean.searchTag}" />
<div class="cont2">
  <div class="table2">
   <div class="title1Bg">
      <div class="title1 f14"><strong>角色查询</strong><span class="f12 fright"><h:commandLink action="#{roleBean.search}"
										styleClass="buts but2" value="查询">
										<f:param name="searchFlag" value="isListSearch"></f:param>
									</h:commandLink>
									<a href="##" onclick="javascript:searchReset()" class="buts but3">重置</a></span></div>
    </div>
    <div class="cont3Bg">
      <div class="cont3Bg2">
        <table border="0" cellpadding="0" cellspacing="0" class="cont3">
          <tr>
          <td align="left" width=200 class="f14">角色代码:</td>
          <td > <h:inputText id="roleCode"  size="30" value="#{roleBean.roleCode}" />
		  </td>
		   <td align="left" width=200 class="f14">角色名称:</td>
          <td > <h:inputText id="roleName"  size="30" value="#{roleBean.roleName}" />
		  </td>
          </tr>
          <tr>
            <td colspan="4" class="td1" height="1"></td>
          </tr>
        </table>
      </div>
    </div>
  </div>
  <div class="table1">
    <div class="title1Bg">
      <div class="title1 f14"><strong>角色列表</strong><span class="f12 fright"> <h:inputHidden id="recordCount" value="#{roleBean.recordCount}" />
                              <h:inputHidden id="pageCount" value="#{roleBean.pageCount}" />
                              <h:inputHidden id="previousPage" value="#{roleBean.previousPage}" />
                              <h:inputHidden id="nextPage" value="#{roleBean.nextPage}" />
									共
									<h:outputText value="#{roleBean.recordCount}" />
									条记录  |  每页显示
									<h:inputText id="pageRecord"
										value="#{roleBean.pageRecord}" size="1" />
									条
									
          
        </span></div>
    </div>
    <table cellpadding="0" cellspacing="0" width="100%">
 
     <h:dataTable binding="#{roleBean.TData}"
                                        value="#{roleBean.items}" var="item"
                                  rowClasses="tr2,tr1"      headerClass="dataTableHead" columnClasses="dataTableTD"
                                        styleClass="viewList">
                                                <h:column> 
         <f:facet name="header"><h:outputText value="选择"/></f:facet> 
             <h:selectBooleanCheckbox id="checked" binding="#{roleBean.selected}" /> 
     </h:column> 
     <h:column> 
         <f:facet name="header"><h:outputText value="角色名称"/></f:facet> 
         <h:outputText value="#{item.roleName}"/>
     </h:column>  
     <h:column> 
         <f:facet name="header"><h:outputText value="角色代码"/></f:facet> 
         <h:outputText value="#{item.roleCode}"/>
     </h:column>  
      <h:column> 
         <f:facet name="header"><h:outputText value="角色说明"/></f:facet> 
         <h:outputText value="#{item.roleDesc}"/>
     </h:column> 

                                  </h:dataTable>
    </table>
    <div class="bottomBg">
      <div class="bottom">
        <div class="page green"><h:commandLink action="#{roleBean.search}" value="首页">
                                        <f:param name="newCurrentPage" value="1"></f:param>
                                        <f:param name="queryFlag" value="ispage"></f:param>
                                    </h:commandLink>
									<h:commandLink action="#{roleBean.search}" value="上一页">
										<f:param name="newCurrentPage"
											value="#{roleBean.previousPage}"></f:param>
										<f:param name="queryFlag" value="ispage"></f:param>
									</h:commandLink>
									&nbsp;
									<h:outputText value="#{roleBean.currentPage}" />
									&nbsp;
									<h:commandLink action="#{roleBean.search}" value="下一页>>">
										<f:param name="newCurrentPage"
											value="#{roleBean.nextPage}"></f:param>
										<f:param name="queryFlag" value="ispage"></f:param>
									</h:commandLink>
									&nbsp;
									<h:commandLink action="#{roleBean.search}" value="末页>>">
										<f:param name="newCurrentPage"
											value="#{roleBean.pageCount}"></f:param>
										<f:param name="queryFlag" value="ispage"></f:param>
									</h:commandLink></div>
   <h:commandLink value="添加" styleClass="buts but4"
											action="#{roleBean.preAdd}" rendered="#{roleBean.magFlag  eq 1}"/>
        <h:commandLink value="修改" styleClass="buts but5"
											action="#{roleBean.preUpdate}"
											onmousedown="return check_updMultiBox(this);" rendered="#{roleBean.magFlag  eq 1}"/>       
        <h:commandLink value="删除" styleClass="buts but6"
											action="#{roleBean.delete}"
											onmousedown="return deletes(this);" rendered="#{roleBean.magFlag  eq 1}"/>
      </div>
   </div>
</div>
</div>
	</h:form>
		</f:view>
</body>
</html>